// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 新增IntegralCode
 * @param pram
 */
export function IntegralCodeCreateApi(datas) {
    return request({
        url: 'admin/integralcode/save',
        method: 'POST',
        data: datas
    })
}

/**
 * integralcode更新
 * @param pram
 */
export function integralcodeUpdateApi(data) {
    return request({
        url: 'admin/integralcode/update',
        method: 'POST',
        data: data
    })
}

export function integralcodeBatchUpdateApi(data) {
    return request({
        url: 'admin/integralcode/batchUpdate',
        method: 'POST',
        data: data
    })
}

/**
 * integralcode详情
 * @param pram
 */
export function integralcodeDetailApi(id) {
    return request({
        url: `admin/integralcode/info/${id}`,
        method: 'GET'
    })
}

/**
 * integralcode 删除
 * @param params
 */
export function integralcodeDeleteApi(ids) {
    return request({
        url: `admin/integralcode/delete`,
        method: 'POST',
        data: ids
    })
}


/**
 * integralcode列表
 * @param pram
 */
export function integralcodeListApi(params) {
    return request({
        url: 'admin/integralcode/list',
        method: 'GET',
        params
    })
}

/**
 * 商品列表 导出
 * @param pram
 */
export function integralcodeExportApi(params) {
    return request({
      url: `/admin/export/excel/integralCode`,
      method: 'get',
      params
    })
  }